{% extends "base.html" %}
{% load staticfiles %}
{% load i18n %}
{% load static %}
{% block title %}问答园{% endblock %}

{% block head %}
    <link href="{% static 'css/questions.css' %}" rel="stylesheet">
    <script src="{% static 'js/questions.js' %}"></script>
{% endblock %}
{% block page_content %}
    <div id="mainbody">
    <div class="container">
        <div class="header">
            <a href="{% url 'ask' %}" class="btn btn-primary pull-right">
               <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> {% trans "我要找片" %}
            </a>
            <h2><small>{% trans "找片问答列表"%}</small></h2>
        </div>

        <div class="questions">
            <ul class="nav nav-tabs">
                <li role="presentation" {% if active == 'all' %} class="active"{% endif %}><a href="{% url 'all' %}">{% trans '全部'%}</a> </li>
                <li {% if active == 'answered' %} class="active"{% endif %} role="presentation" ><a href="{% url 'answered' %}">{% trans '已采纳'%}</a> </li>
                <li role="presentation" {% if active == 'unanswered' %} class="active"{% endif %}><a href="{% url 'unanswered' %}">{% trans '未采纳'%}</a> </li>
            </ul>

            {% for question in questions %}
              {% include 'questions/partial_question.html' with question=question %}
            {% empty %}
              <h4 class="no-data">{% trans "没有问题" %}</h4>
            {% endfor %}
            {% include 'paginator.html' with paginator=questions %}

        </div>

    </div>
    </div>
    <!--主体内容结束-->

{% endblock %}